
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware

from src.database.core import lifespan

from src.user_service.api.router import user_router
from src.region_service.api.router import location_router
from src.weather_service.api.router import full_weather_router

from src.osm_module.api import osm_router

app = FastAPI(
    title="services",
    lifespan=lifespan
)

app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_methods=["*"],
    allow_headers=["*"],
)

app.include_router(user_router)
app.include_router(location_router)
app.include_router(full_weather_router)

app.include_router(osm_router)
